public class Thoroughbred {
    // 私有属性
    private String mother;
    private String father;
    private int birthyear;

    // 构造方法
    public Thoroughbred(String mother, String father, int birthyear) {
        this.mother = mother;
        this.father = father;
        this.birthyear = birthyear;
    }

    // 获取当前年龄的方法
    public int getCurrentAge() {
        // 获取当前年份
        int currentYear = Calendar.getInstance().get(Calendar.YEAR);
        // 计算年龄
        return currentYear - birthyear;
    }

    // 获取父亲的方法
    public String getFather() {
        return father;
    }

    // 获取母亲的方法
    public String getMother() {
        return mother;
    }
}
